Documentation/15 07 26/sphinx and uml - #26
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
ddbaptiste
left a comment
There was a problem hiding this comment.
Question: Should we include the "Returns" field on all docstrings, including those like lines 57-75 in src/respondpy/data/parameters.py:
def get_parameter_type(self) -> ParameterType:
"""Return the wrapped parameter type."""
return self.__parameter_type
def is_time_varying(self) -> bool:
"""Return whether this parameter is indexed by timestep."""
if self.__parameter_type == ParameterType.INITIAL_COHORT:
return False
return True
def is_transition_matrix_operation(self) -> bool:
"""Return whether this parameter maps to transition-matrix data."""
if self.__parameter_type in [ParameterType.INTERVENTION_TRANSITION_PROBABILITY, ParameterType.BEHAVIOR_TRANSITION_PROBABILITY]:
return True
return False
def is_state_vector_operation(self) -> bool:
"""Return whether this parameter maps to state-vector data."""
return not self.is_transition_matrix_operation()or should we only enforce the documentation in functions that raise errors or return custom types?
Otherwise, just a few small points flagged in line comments.
Co-authored-by: Dimitri Baptiste <55843498+ddbaptiste@users.noreply.github.com> Signed-off-by: Matthew Carroll <28577806+MJC598@users.noreply.github.com>
I would say we can, although am not entirely sold on things like the standard overloads for Python classes? Doing it for this instance for sure though. |
Co-authored-by: Dimitri Baptiste <55843498+ddbaptiste@users.noreply.github.com> Signed-off-by: Matthew Carroll <28577806+MJC598@users.noreply.github.com>
What does this PR do?
UML Documentation and some Numpy/SciPy docstring standards.
What Wrike task is this associated with?
https://www.wrike.com/open.htm?id=4509517763
Checklist before merging